<template>
  <div>
        我是权限管理
         <el-table
      :data="tableData"
      style="width: 100%">
      <el-table-column
         type="index"
        label="#"
       >
      </el-table-column>
      <el-table-column
        prop="authName"
        label="权限"
         >
      </el-table-column>
      <el-table-column
        prop="path"
        label="路径">
      </el-table-column>
      <el-table-column
        prop="level"
        label="等级">
          <template v-slot="ss">
                 <el-tag type="info" v-if="ss.row.level==0" >垃圾</el-tag>
<el-tag type="warning" v-else-if="ss.row.level==1">强者</el-tag>
<el-tag type="danger" v-else>王者</el-tag>
          </template>

      </el-table-column>
    </el-table>
  </div>
</template>

<script>


export default {
data() {
  return {
    tableData:[]
  }
},
async created() {
          const {data:res} = await this.axios.get('/rights/list')
    
          this.tableData=res.data
},
}
</script>